Closed
Conversation
aws#1434 This is intended to get the following integration tests passing: tests/integration/local/start_api/test_start_api.py TestServiceCorsSwaggerRequests TestServiceCorsGlobalRequests Those tests use a [CorsConfiguration](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-property-api-corsconfiguration.html) and a [Cors Global](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-specification-template-anatomy-globals.html), respectively, to enable CORS. When CORS is enabled, OPTIONS requests should send a 200 with the specified CORS headers, even if no OPTIONS handler is explicitly stated in the pre-transformation SAM template. I confirmed this by deploying from a [SAM template](https://github.com/douglasnaphas/play-sam/tree/master/cors-swagger) similar to one of the failing integration tests (with Cors specified but with no explicit OPTIONS handler), and observing that it does indeed respond with a 200 and the CORS headers attached.
aws#1434 This adds an integration test to verify that templates with explicit OPTIONS handlers actually have those handlers invoked on OPTIONS requests. There has been an issue with OPTIONS requests returning 200 and not reaching an explicitly specified OPTIONS handler. aws#1649 fixes that, so if the integration test added in this commit passes (and fails on the develop branch), it could be added to that PR.
Contributor
|
This was applied to #1649 and will be reviewing that PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am raising this to test out an integration test that I want to add to #1649, since I can't get the integration tests to run locally.
Issue #, if available:
Why is this change necessary?
How does it address the issue?
What side effects does this change have?
Checklist:
make prpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.